{temp('kefu/head')}
</head>
<body>
	<div class="pd-20">
		<div class="form form-horizontal" id="form-article-add">
			<div class="row cl">
				<label class="form-label col-2">企业简介：</label>
				<div class="formControls col-10"> 
					<script id="editor1" type="text/plain" style="width:100%;height:300px;">{$rs['qyjj']}</script> 
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">主营业务：</label>
				<div class="formControls col-10"> 
					<script id="editor2" type="text/plain" style="width:100%;height:300px;">{$rs['zyyw']}</script> 
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">合作机会：</label>
				<div class="formControls col-10"> 
					<script id="editor3" type="text/plain" style="width:100%;height:300px;">{$rs['hzjh']}</script> 
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">服务声明：</label>
				<div class="formControls col-10"> 
					<script id="editor4" type="text/plain" style="width:100%;height:300px;">{$rs['fwsm']}</script> 
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">帮助中心：</label>
				<div class="formControls col-10"> 
					<script id="editor5" type="text/plain" style="width:100%;height:300px;">{$rs['bzzx']}</script> 
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">电话：</label>
				<div class="formControls col-10">
					<input type="text" class="input-text" value="{$rs['phone']}" placeholder="" id="phone">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">邮箱：</label>
				<div class="formControls col-10">
					<input type="text" class="input-text" value="{$rs['email']}" placeholder="" id="email">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">公司名称：</label>
				<div class="formControls col-10">
					<input type="text" class="input-text" value="{$rs['firm']}" placeholder="" id="firm">
				</div>
			</div>
			<div class="row cl">
				<label class="form-label col-2">地址：</label>
				<div class="formControls col-10">
					<input type="text" class="input-text" value="{$rs['address']}" placeholder="" id="address">
				</div>
			</div>
			<div class="row cl">
				<div class="col-10 col-offset-2">
					<button onClick="tj();" class="btn btn-primary radius" type="submit">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
					<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	function tj(){
		var qyjj = UE.getEditor('editor1').getContent();
		var zyyw = UE.getEditor('editor2').getContent();
		var hzjh = UE.getEditor('editor3').getContent();
		var fwsm = UE.getEditor('editor4').getContent();
		var bzzx = UE.getEditor('editor5').getContent();
		var phone = document.getElementById('phone').value;
		var email = document.getElementById('email').value;
		var firm = document.getElementById('firm').value;
		var address = document.getElementById('address').value;
		$.post('{$_url}/kefu/?act=jianjie_u',{qyjj:qyjj,zyyw:zyyw,hzjh:hzjh,fwsm:fwsm,bzzx:bzzx,phone:phone,email:email,firm:firm,address:address},function(data){
			if(data == 'cg'){
				layer.alert('修改成功');
				setTimeout(function(){parent.location.reload();},800);return ;
			}else if(data == 'error'){
				layer.alert('修改失败');return ;
			}
		});
	}
	
	$(function(){
		$('.skin-minimal input').iCheck({
			checkboxClass: 'icheckbox-blue',
			radioClass: 'iradio-blue',
			increaseArea: '20%'
		});
		
		$list = $("#fileList"),
		$btn = $("#btn-star"),
		state = "pending",
		uploader;
	
		var uploader = WebUploader.create({
			auto: true,
			
			// 选择文件的按钮。可选。
			// 内部根据当前运行是创建，可能是input元素，也可能是flash.
			pick: '#filePicker',
		
			// 不压缩image, 默认如果是jpeg，文件上传前会压缩一把再上传！
			resize: false,
			// 只允许选择图片文件。
			accept: {
				title: 'Images',
				extensions: 'gif,jpg,jpeg,bmp,png',
				mimeTypes: 'image/*'
			}
		});
		
		var ue1 = UE.getEditor('editor1');
		var ue2 = UE.getEditor('editor2');
		var ue3 = UE.getEditor('editor3');
		var ue4 = UE.getEditor('editor4');
		var ue5 = UE.getEditor('editor5');
		/* ue.ready(function() {
		    ue.setContent("{$xw['content']}");
		}); */
	});
	</script>
	{temp('kefu/foot')}
</body>
</html>